#ifndef MAIL_PREVIEW_H
#define MAIL_PREVIEW_H

#include <list>
#include <string>

#include <Qt\qdialog.h>
#include <Qt\qlabel.h>
#include <Qt\qlineedit.h>
#include <Qt\qtextedit.h>
#include <Qt\qboxlayout.h>
#include <Qt\qpushbutton.h>

#include "Mail.h"

class ResaHotelGUI;

class MailPreview : public QDialog{
	Q_OBJECT

public :
	static const int MINIMUM_DIALOG_WIDTH;
	static const int SEPARATOR_STRETCH_FACTOR;
	static const int LABEL_STRETCH_FACTOR;
	static const int FIELD_STRETCH_FACTOR;

private :
	QBoxLayout* layout;

	QLabel* fromLabel;
	QLabel* toLabel;
	QLabel* replyToLabel;
	QLabel* subjectLabel;
	QLabel* ccLabel;
	QLabel* bodyLabel;

	QLineEdit* from;
	QLineEdit* to;
	QLineEdit* replyTo;
	QLineEdit* subject;
	QLineEdit* cc;
	QTextEdit* body;

	QPushButton* sendMailButton;
	QPushButton* cancelButton;

	Mail* mail;
	
	MailPreview(const MailPreview&) {}

public :
	virtual ~MailPreview(void){
		//Nothing
	}

	MailPreview(ResaHotelGUI* _parent, Mail* _mail);

public slots :
	void validate(void);
	void cancel(void);
};

#endif //MAIL_PREVIEW_H